package com.kingyea.app.market.client;

import com.kingyea.mobilepolice.system.Result;
import com.kingyea.mobilepolice.system.aspect.NotResult;
import com.kingyea.mobilepolice.user.bean.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(value = "auth-server")
public interface UserServiceClient {

    @NotResult
    @PostMapping(value = "/user/list")
    Object getUserList(@RequestBody Map<String, Object> map);

    @NotResult
    @PostMapping("/user/detail/{userId}")
    Result<User> getByUserId(@PathVariable("userId") String userId);

    @RequestMapping(value = "/user/getCurrentUserInfo", method = RequestMethod.GET)
    Result<User> getCurrentUserInfo();
}
